﻿<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>转接</title>
<script language="javascript">
function cti_call() {
	var str = document.getElementById("phoneNum").value;
	var str2 =13;
	if (str == "") {
		   alert("请输入电话号码");
	}
	else if(str2==str) { 
		window.parent.dialogArguments.TransferToQueue(str);	
}
	else {

		//window.opener.CallAgent(str);//CallAgent自动在外呼电话前+9
		window.parent.dialogArguments.InitialTransfer(str);//初始化转接			
		document.getElementById("btnInitial").disabled = "true";
	}
}

function cti_callfinish() {

		if(window.parent.dialogArguments.AgentStatus() != 5)
		{
		  alert("电话已挂断.");
		  window.close();

		  return;
		}

		if(window.parent.dialogArguments.CompleteTransfer() == 0)	//完成转接	
		{
			window.close();
		}
}

function cti_callcancel() {
		
		if(window.parent.dialogArguments.AgentStatus() != 5)
		{
		  alert("电话已挂断.");
		  window.close();

		  return;
		}

		if(window.parent.dialogArguments.TransferState() != 0)
		{
			if(window.parent.dialogArguments.CancelTransfer() == 0)	//取消转接
			{
				window.close();
			}
		}
		else
		{
			window.close();
		}
}
 function changeIt(){    
 phoneNum.value = select1.options[select1.selectedIndex].value;    
 
 }

function showDTMF()
{
	window.showModalDialog('callSendNum.jsp',window.parent.dialogArguments,'dialogWidth:220px;dialogHeight:200px;scroll:no;');
}

</script>
<style type="text/css">
<!--
.stlItm {color: #333333; font-size:24px; font-weight:bold;}
.stlTel {height:40px; width:280px; border:1px solid #dce1e8; font-size:30px;}
-->
</style>
</head>
<body>

<Div style="margin-top:40px;">
       <table align="center" width="96%" cellSpacing="0" cellPadding="0" border="0">
          <tr>
		    <td height="90" align="right"><span class="stlItm">电话号码：</span>
			<select  name="select1" id="select1" onchange="changeIt()" > 
			   <option selected>请选择转接号码</option> 
			   <option value="962965">自来水公司</option>    
			   <option value="962777">市燃气公司</option>    
			   <option value="85076868">公交集团</option> 
			   <option value="02861638000">地铁公司</option>    
			   <option value="96655">省广电公司</option>    
			  <option value="65707007">市交管局</option>
 			   <option value="87706903">市人社</option>
			   <option value="67837860">公积金人工服务</option>
			   <option value="86280493">公积金自主查询</option>
			   <option value="12348">公共法律服务专席</option> 
			   <option value="86759339">省政务中心</option>
			   <option value="13">疫情处</option>
			   <option value="02862139094">省健康码</option>
			   <option value="02862139094">省12345</option>	
<option value="19302836995">未成年人救助保护中心</option>
<option value="02838119999">眉山</option>
<option value="083812345">德阳</option>
<option value="02826111041">资阳</option>
<option value="02812366">市税务</option>	 
			  </select></td>
            <td><input id="phoneNum" type="text" value="" class="stlTel" maxlength="15"/></td>
          </tr>
		  <tr>
		    <td colspan="2" align="center"><div style="margin-top:20px;">
			<input id="btnInitial" type="image" src="xbInit.jpg" onClick="cti_call();"/>
			 &nbsp;&nbsp;&nbsp;&nbsp;
			<input type="image" src="xbh.png" onclick="showDTMF()">
			&nbsp;&nbsp;&nbsp;&nbsp;
  <input name="btnCfm" type="image" src="xbOver.jpg" onClick="cti_callfinish();"/>
  &nbsp;&nbsp;&nbsp;&nbsp;
  <input name="btnClose" type="image" src="xbCancel.jpg" onClick="cti_callcancel();"/>
 
  </div></td>
          </tr>
        </table>
</Div>

</body>
</html>